import { http } from "@/utils/http";
import { baseUrlApi } from "./utils";

type homeResult = {
  page: any;
  result: any
};

/** 分页查询封装文件信息 */
export const sjcyzcrjselpackagepage = (data?: object) => {
  return http.request<homeResult>("post", baseUrlApi("/api/backend/sjcyzcrj/selpackagepage"), { data });
};


/** 封装文件详情 */
export const sjcyzcrjselpackageinfobyid = (id) => {
  return http.request<homeResult>("get", baseUrlApi(`/api/backend/sjcyzcrj/selpackageinfobyid/${id}`));
};


/** 修改封装文件基础信息 */
export const sjcyzcrjupdatepackage = (data?: object) => {
  return http.request<homeResult>("post", baseUrlApi("/api/backend/sjcyzcrj/updatepackage"), { data });
};

/** 删除封装文件分类信息 */
export const sjcyzcrjdelpackagebyid = (userid?: string | number) => {
  return http.request<homeResult>("get", baseUrlApi(`/api/backend/sjcyzcrj/delpackagebyid/${userid}`));
};


/** 新增封装文件基础信息 */
export const sjcyzcrjinsertpackage = (data?: object) => {
  return http.request<homeResult>("post", baseUrlApi("/api/backend/sjcyzcrj/insertpackage"), { data });
};